package admin

import database "hft/Database"

type Property struct {
	database.Base
	Name       string    `json:"name,omitempty" gorm:"uniqueIndex"`
	BackColor  string    `json:"backColor,omitempty"`
	TextColor  string    `json:"textColor,omitempty"`
	StatusCode int       `json:"statusCode,omitempty" gorm:"type:tinyint(1);size:1;index;unique"`
	LouPans    []*LouPan `json:"loupan" gorm:"many2many:_loupan_property;foreignKey:StatusCode;references:ID;constraint:OnDelete:CASCADE,OnUpdate:CASCADE"`
}

func (Property) TableName() string {
	return database.TableNameFormat("property")
}
